Builder

class Builder

A builder class to construct engine options.

Builders are created by invoking newBuilder. Each of the setter methods modifies the state of the builder and returns the same instance. Builders are not thread-safe and should not be used concurrently from multiple threads without external synchronization.

Functions

Link copied to clipboard
Associates the given URL scheme with the callback, so that all URL requests with the given scheme will be intercepted before they are sent out.
Link copied to clipboard
open fun addSwitch(commandLineSwitch: String): EngineOptions.Builder
Adds the switch to the list of the switches that will be passed to the Chromium process.
Link copied to clipboard
Allows file access from files for the Engine instance.
Link copied to clipboard
open fun build(): EngineOptions
Creates an EngineOptions instance.
Link copied to clipboard
open fun chromiumDir(chromiumDir: Path): EngineOptions.Builder
Sets the absolute path to the directory where Chromium binaries are located.
Link copied to clipboard
Disables Chromium services that cause additional traffic, such as Google Cloud Messaging, Translate Ranker, Extensions Updater, Safe Browsing, etc.
Link copied to clipboard
Disables DNS quick check.
Link copied to clipboard
Disables GPU rendering for the Engine instance.
Link copied to clipboard
Disables the sandbox for the Engine instance.
Link copied to clipboard
Disables the touch popup menu for the Engine instance.
Link copied to clipboard
Disables the same-origin policy for the Engine instance.
Link copied to clipboard
open fun diskCacheSize(diskCacheSize: Long): EngineOptions.Builder
Sets the disk cache size, in bytes.
Link copied to clipboard
Allows automatically starting video and audio playbacks.
Link copied to clipboard
Enables the incognito mode for the default profile of the Engine instance.
Link copied to clipboard
Enables media routing for the Engine instance.
Link copied to clipboard
Enables the given proprietary feature for the Engine instance.
Link copied to clipboard
open fun googleApiKey(googleApiKey: String): EngineOptions.Builder
Sets the Google API key.
Link copied to clipboard
open fun googleDefaultClientId(googleDefaultClientId: String): EngineOptions.Builder
Sets the Google client ID.
Link copied to clipboard
open fun googleDefaultClientSecret(googleDefaultClientSecret: String): EngineOptions.Builder
Sets the Google client secret.
Link copied to clipboard
Sets the Chromium language that is used on the default error pages and the message dialogs.
Link copied to clipboard
open fun licenseKey(licenseKey: String): EngineOptions.Builder
Sets the licence key required to perform operations with the engine.
Link copied to clipboard
Sets the password store type that specifies which storage backend to use to encrypt cookies on Linux.
Link copied to clipboard
open fun remoteDebuggingPort(remoteDebuggingPort: Int): EngineOptions.Builder
Sets the remote debugging port.
Link copied to clipboard
Sets how long the renderer can be unresponsive before it is considered hung.
Link copied to clipboard
Adds the given origins to the white list.
Link copied to clipboard
open fun userAgent(userAgent: String): EngineOptions.Builder
Sets the custom user agent string that is used to override the default user agent for the Engine.
Link copied to clipboard
open fun userDataDir(userDataDir: Path): EngineOptions.Builder
Sets the absolute path to the directory where the user data is stored.